cmake_minimum_required(VERSION 3.8)
project(SetProperty)
add_subdirectory(SubDir)
include_directories("${PROJECT_SOURCE_DIR}/SubDir")
add_executable(SetProperty main.cpp)
target_link_libraries(SetProperty MyPrint)

get_property(aa GLOBAL PROPERTY global_var1)
get_property(bb GLOBAL PROPERTY global_var2)
message("1 Main global_var1 = ${aa}")
message("1 Main global_var2 = ${bb}")
set_property(GLOBAL APPEND_STRING PROPERTY global_var1 "cccc")
set_property(GLOBAL APPEND PROPERTY global_var2 "dddd")
get_property(aa GLOBAL PROPERTY global_var1)
get_property(bb GLOBAL PROPERTY global_var2)
message("2 Main global_var1 = ${aa}")
message("2 Main global_var2 = ${bb}")

set_property(GLOBAL PROPERTY global_var1 "eeee")
get_property(aa GLOBAL PROPERTY global_var1)
message("3 Main global_var1 = ${aa}")

get_property(aa DIRECTORY SubDir PROPERTY dir_var1)
get_property(bb DIRECTORY PROPERTY dir_var2)
message("1 Main Directory dir_var1 = ${aa}")
message("1 Main Directory dir_var2 = ${bb}")
set_property(DIRECTORY SubDir APPEND_STRING PROPERTY dir_var1 "dir33")
set_property(DIRECTORY APPEND_STRING PROPERTY dir_var2 "dir44")
get_property(aa DIRECTORY SubDir PROPERTY dir_var1)
get_property(bb DIRECTORY PROPERTY dir_var2)
message("2 Main Directory dir_var1 = ${aa}")
message("2 Main Directory dir_var2 = ${bb}")
